<template>
    <div>
        <Row class="expand-row">
             <Table stripe border :columns="columns1" :data="data1"></Table>
        </Row>
    </div>
</template>
<script>
export default {
  data () {
    return {
      $ajax: null,
      path: this.$route.path,
      // 已处理列
      columns1: [
        {
          title: '客户身份证',
          key: 'custCardNo',
          align: 'center',
          className: 'tbake'
        },
        {
          title: '资金方',
          key: 'fundName',
          align: 'center',
          width: 80,
          className: 'tbake'
        },
        {
          title: '还款方式',
          key: 'paymentWay',
          align: 'center',
          className: 'tbake',
          render: (h, params) => {
            if (params.row.paymentWay === '1') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '自动代扣')
            }
            if (params.row.paymentWay === '2') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '当期还款')
            }
            if (params.row.paymentWay === '3') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '提前结清')
            }
            if (params.row.paymentWay === '4') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '主动还款')
            }

            if (params.row.paymentWay === '5') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '下期还款')
            }
            if (params.row.paymentWay === '6') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '手动代扣')
            }
            if (params.row.paymentWay === '9') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '支付宝还款')
            }
            if (params.row.paymentWay === '10') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '支付宝提前结清')
            }
          }
        },
        {
          title: '还款通道',
          key: 'paymentChannel',
          align: 'center',
          className: 'tbake',
          render: (h, params) => {
            if (params.row.paymentChannel === '001') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '快付通（云科谷）')
            }
            if (params.row.paymentChannel === '002') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '宝付（云科谷）')
            }
            if (params.row.status === '003') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '宝付（口袋）')
            }
            if (params.row.status === '004') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '宝付（渤海）')
            }

            if (params.row.status === '005') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '支付宝')
            }
            if (params.row.status === '006') {
              return h('span', {
                props: {
                  type: 'text',
                  size: 'small'
                }
              }, '运营')
            }
          }
        },
        {
          title: '放款日期',
          key: 'loanDate',
          align: 'center',
          className: 'tbake',
          render: (h, params) => {
            var vm = this
            return h('div', [
              h('span', vm.$util.loanModularFormatTime(params.row.loanDate))
            ])
          }
        },
        {
          title: '响应方流水号',
          key: 'orderNumber',
          align: 'center',
          className: 'tbake'
        },
        {
          title: '转账人',
          key: 'transferUser',
          align: 'center',
          className: 'tbake'
        },
        {
          title: '备注',
          key: 'remark',
          align: 'center',
          className: 'tbake'
        }
      ],
      data1: [ ]
    }
  },
  props: {
    row: Object
  },
  created () {
    // 初始化当前页面请求对象实例
    // this.mobileNum = this.row.mobileNum
    this.data1.push(this.row)
  }
}
</script>
<style scoped>
    .expand-row{
        margin-bottom: 12px;
    }
.tbake .ivu-table-cell{
  padding-left: 2px;
  padding-right: 2px;
}

</style>
